package zhh.tangbao.auxiliary.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import zhh.tangbao.auxiliary.entity.SystemOpinionType;
import zhh.tangbao.auxiliary.vo.opinion.OpinionTypeSelectOptionVo;

import java.util.List;

/**
 * <p>
 * 描述
 * </p>
 *
 * @author 粥灰灰
 * <p>2023/4/26</p>
 */

@Repository
@Mapper
public interface SystemOpinionTypeDao extends BaseMapper<SystemOpinionType> {

    @Select("SELECT id stringKey, name label FROM system_opinion_type")
    List<OpinionTypeSelectOptionVo> getSelectOptions();

    @Select("SELECT name FROM system_opinion_type WHERE id = #{id}")
    String getTypeName(@Param("id") String id);
}
